package com.llmcu.graphic.designpatterns.command;

import com.llmcu.graphic.designpatterns.command.test.MyCanvas;

/**
 * xxxx
 *
 * @author liuling
 * @date 2024/7/20 16:22
 */
public class DrawCommand implements Command{
    private int x;
    private int y;
    private MyCanvas canvas;

    public DrawCommand(int x, int y, MyCanvas canvas) {
        this.x = x;
        this.y = y;
        this.canvas = canvas;
    }

    @Override
    public void execute() {
        canvas.draw(x,y);

    }
}
